14 步:我们的错误处理函数的结构很好!让我们再次调用get_user_input()

  • 首先,在handle_user_errors()中,在try语句中删除它: x · = · 5 · / · 0
  • , 将Function Call into Variable拖到try语句中缩进的变量中。
  • my_function更改为get_user_inputmy_var更改为user_input
  • 最后,将Return Statement拖到下一行并将my_var更改为user_input

    To navigate the page using the TAB key, first press ESC to exit the code editor.

    # THIS ACTIVITY IS IN PREVIEW ONLY MODE
    • Run Code
    • Submit Work
    • Next Activity
    • Show Console
    • Reset Code Editor
    • Codesters How To (opens in a new tab)